<? 
    session_start();
	include ("../../core/conn.php");
	$db = get_conn();
	
	$id_location = $_GET['id'];
	$layer = $_GET['layer'];

	$sql="select v.* from vehicules v where id_location  = $id_location order by id";
	$result = mysql_query($sql);
	if($result){
		while($row = mysql_fetch_array($result)){
			$add_link = "<a href='vehicules_form.php?id_location=".$id_location."&layer=".$layer."' onClick='$(this).modal({width:350, height:230}).open(); return false;'><img src='images/plus_icon.jpg' width='22' height='22' border='0' title='click para agregar' /></a>";	
	
			$data.="<tr>";
			$data.="<td><a onClick='$(this).modal({width:350, height:350}).open(); return false;' href='vehicules_form.php?id=".$row['id_vehicule']."&layer=".$layer."'>Placa: ".$row['id']."</a></td>";
			$data.="</tr>";
		}//while
		echo "<table border='1' class='contenido_forma'>".$data."<tr><td>$add_link</td></tr></table>";
	}else{
		
		error_handling("get_roles: ".$sql,mysql_error());
	}

?>

